import {request} from '../../request/request'
Page({
  data: {
    Classification:[]
  },
  onLoad: function(options) {
    this.getClassification();
  },

  inSearch:function(){
    wx.navigateTo({
      url: '../search/search',
    })
  },

  getClassification(){
    request({
      url:'/query-classification'
    }).then((result)=>{
      console.log(result);
      this.setData({
        Classification:result.data.data
      })
      wx.stopPullDownRefresh();  
    })
  },
  
  onPullDownRefresh:function(){
      this.setData({
        Classification:[]
      })
      this.getClassification();
  }
})
